package com.kamistoat.meimeichat.meimeichatclient.config;

public class NettyClientConstant {

//    public static final String NETTY_SERVER_CONNECT_HOST = "113.54.153.166";
//    public static final String NETTY_SERVER_WEB_HOST = "http://113.54.153.166";
//    public static final String NETTY_SERVER_P2P_HOST = "113.54.153.166";

//        public static final String NETTY_SERVER_CONNECT_HOST = "127.0.0.1";
//    public static final String NETTY_SERVER_WEB_HOST = "http://127.0.0.1";
//    public static final String NETTY_SERVER_P2P_HOST = "127.0.0.1";

    public static final Integer NETTY_SERVER_CONNECT_PORT = 12012;
    public static final Integer NETTY_SERVER_P2P_PORT = 12022;
    public static final Integer NETTY_SERVER_WEB_PORT = 12000;

    public static final String NETTY_SERVER_CONNECT_HOST = "47.92.110.157";
    public static final String NETTY_SERVER_WEB_HOST = "http://47.92.110.157";
    public static final String NETTY_SERVER_P2P_HOST = "47.92.110.157";
//
//    public static final Integer NETTY_SERVER_CONNECT_PORT = 40548;
//    public static final Integer NETTY_SERVER_WEB_PORT = 80;
//    public static final Integer NETTY_SERVER_P2P_PORT = 37000;

    public static final Integer NETTY_P2P_LISTEN_PORT = 12032;

    public static final int P2P_TIMEOUT = 10 * 60 * 1000;

    public enum WebApi {
        QUERY_FRIEND_CHAT_RECORD("/meimeichatserver/webapi/queryFriendChatRecord", "查询好友间聊天记录"),
        QUERY_USER_HEAD_URI("/meimeichatserver/webapi/queryUserHead", "查询用户头像");

        private String uri;
        private String info;

        WebApi(String uri, String info) {
            this.uri = uri;
            this.info = info;
        }

        public String getUri() {
            return uri;
        }

        public String getInfo() {
            return info;
        }
    }


    /**
     * 聊天类型-私聊/群聊
     */
    public enum TalkType {
        Friend(0, "好友"),
        Group(1, "群组");

        private Integer code;
        private String info;

        TalkType(Integer code, String info) {
            this.code = code;
            this.info = info;
        }

        public Integer getCode() {
            return code;
        }

        public String getInfo() {
            return info;
        }

    }


    /**
     * 聊天框显示状态-展开/收起
     */
    public enum TalkBoxShowStatus {
        OPEN(0, "展开"),
        STACK(1, "收起");

        private Integer code;
        private String info;

        TalkBoxShowStatus(Integer code, String info) {
            this.code = code;
            this.info = info;
        }

        public Integer getCode() {
            return code;
        }

        public String getInfo() {
            return info;
        }

    }

    /**
     * 消息发送者标识-自己/好友
     */
    public enum MsgUserType {

        Myself(0, "自己"),
        Friend(1, "好友");

        private Integer code;
        private String info;

        MsgUserType(Integer code, String info) {
            this.code = code;
            this.info = info;
        }

        public Integer getCode() {
            return code;
        }

        public String getInfo() {
            return info;
        }
    }


    /**
     * 好友状态
     */
    public enum FriendRelationType {

        Normal(0, "正常(已添加)"),
        Deleted(1, "已删除"),
        Blocked(2, "已拉黑"),
        Foreign(3, "未添加");

        private Integer code;
        private String info;

        FriendRelationType(Integer code, String info) {
            this.code = code;
            this.info = info;
        }

        public Integer getCode() {
            return code;
        }

        public String getInfo() {
            return info;
        }
    }

    /**
     * 在线状态
     */
    public enum OnLineStatus {

        OnLine(0, "在线"),
        OffLine(1, "离线");

        private Integer code;
        private String info;

        OnLineStatus(Integer code, String info) {
            this.code = code;
            this.info = info;
        }

        public Integer getCode() {
            return code;
        }

        public String getInfo() {
            return info;
        }
    }

    /**
     * UDP确认状态
     */
    public enum UDP_ANSWER_CONFIRM_STATUS{

        Half_Confirm(0, "半确认"),
        Full_Confirm(1, "全确认");

        private Integer code;
        private String info;

        UDP_ANSWER_CONFIRM_STATUS(Integer code, String info) {
            this.code = code;
            this.info = info;
        }

        public Integer getCode() {
            return code;
        }

        public String getInfo() {
            return info;
        }
    }

}
